/**
 * 
 */

package gist;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import common.utils.JodaTimeTools;


/**
 * @author Administrator
 * 
 */
public class JodaTime {

    public static void main(String[] args) {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd H:m:s");
        Date date = new Date("1962-09-17 00:00:00.0");
        format.format(date);
        System.out.println(format.format(date));

    }

    /**
     * 
     * 格式化日期
     * 
     * @author gss
     * @param date
     * @param format
     * @return
     * @throws ParseException
     */
    public static String formatString(String date, String format) {
        return JodaTimeTools.toString(JodaTimeTools.toDate(date), format);
    }
}
